1. Technical Field
This invention relates to rotating memory systems of the type used to store data in digital computer systems, and particularly to a technique for improving data transfer time.
2. Prior Art
Rotating mechanical data storage devices such as disk drives transfer data much less rapidly than electronic memories, registers, and data channels. To avoid component mismatches, prior art disk drive controllers have been designed with buffer memories for fast transfers to or from data channels and main memories, and for slow transfers to or from disks. Although a disk drive controller buffer shortens the employment of the fast devices buffered from the disk, such a buffer does not help with the separate problem of time wasted while wanted-but-out-of-sequence sectors on the disk pass, and thus does not advance the start of, or reduce the time needed for the actual disk transfer. In some systems it is desirable to reduce this waiting time.
Data in physical records or blocks is generally serialized and stored on a track in fairly evenly spaced "sectors" arranged in a logical sequence, either in consecutive or in interleaved numerical order. Each sector begins with a "header" portion containing identification numbers unique to that sector, which is followed by a data storage portion. In addition, the sector may contain synchronization and error detection or correction information, which is not of interest to the subject invention and therefore will not be discussed here.
To read data from or write data to a disk on a moving-head drive, a conventional disk controller first generates signals for the drive to move the head to the appropriate track. The controller does not transfer data until the first desired record, which may be in any one of the sectors on the disk, rotates up to the head. Since the sectors are initialized in continually ascending numerical order, and since it is indeterminate which sector will be recognized first, "dead time" waiting is required until the lowest-numbered sector to be read or written rotates into position. This waiting period is generally wasted. In some single sector or partial-track transfers, no desired sectors pass under the head during the waiting period, so the wait is unavoidable. However, on the average in multi-sector transfers, there is a waiting period of half a rotation for the desired initial sector number to pass under the read/write head. During this waiting period, many desired higher-numbered sectors may pass under the head but no data transfer to these sectors takes place until they return after the lower-numbered sectors. For example, if the disk rotates at 3,600 rpm and the desired operation is a data read from sectors 3 through 20 on a specified 24-sector track, and the head seeks and happens to settle on the track as sector 8 is passing, then the desired read operation is delayed while sectors 8-24, 1 and 2 pass. Only then are sectors 3 through 20 read. The resulting 12-sector (8 to 20) half-rotational delay is approximately 8 milliseconds, which is undesirable. In this example the dead time can vary from none to approximately 16 milliseconds for a full rotation, depending upon the location at which the head happens to settle on the track. The range of dead time varies inversely with respect to the speed of the disk.
The wasted time while wanted-but-out-of-sequence sectors pass might be eliminated by transferring sectors in whatever sequence they pass. This has been done in a prior art low speed floppy disk controller which uses part of the main memory as a look-up table. In such a system, when the central processing unit of the computer requests that data be transferred into or out of the main memory, the number of records, record length, and starting address of the first record in the main memory are used by the disk controller to calculate the main memory addresses corresponding to sector numbers on the disk. The calculation for each sector involves subtracting the starting sector from the desired sector number, multiplying the difference by the record length, and adding an offset equal to the starting source or destination address in the main memory. Then, for reading or writing to the disk, track sector numbers are read, sent via the data channel to the main memory, and used as an address to the table to see if a transfer is wanted for that sector. If the table indicates a transfer, one is made. The address of the corresponding block in the main memory is computed dynamically by using the above-mentioned calculation. Alternatively, the memory address may be retrieved from a table of previously computed addresses stored in the disk controller, or in the main memory. If single blocks cannot be transferred directly to arbitrary locations in main memory, then, in addition to the table, an intermediate storage buffer must be provided in the memory. This achieves the transfer of all data wanted on a track within one revolution, but occupies the memory channel for table look-ups during the entire revolution. Even with the channel constantly occupied by the disk transfer, the transfer speed is limited by the requirement that the header numbers be transmitted to the main memory table, and for disk writing the requirement that the block then be fetched from the memory and transmitted to the disk drive. Verifying the transfer requires the memory and channel to be tied up twice as long so that the data on the disk can be read back through a CPU register and compared with the blocks in the main memory. Buffers in the memory or disk drive do not save time if the data channel is occupied anyway looking up sector numbers in a main memory table.
The floppy disk method, unfortunately, is not readily adaptable to high-speed, hard disk systems, especially for writing, since it is difficult to fetch data from main memory in the instant between a sector header being read and its data area beginning to pass the head. The critically short memory latency time may be shorter or not even immediately available in multiuser systems when the system memory required by the disk controller is tied up and interrupted by other devices. Therefore, the technique used for a floppy disk controller is unsatisfactory for hard disk controllers, which have much higher data transfer rates.